﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace QDPay.code
{
    public class FormBase : Form
    {
        static Form mainForm;

        public static void SetMainForm(Form mainForm)
        {
            FormBase.mainForm = mainForm;
        }

        public void OpenForm(Form frm)
        {
            mainForm.Hide();
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.MinimizeBox = false;
            frm.FormBorderStyle = FormBorderStyle.FixedSingle;
            frm.Show();
        }

        public void CloseForm(Form frm)
        {
            frm.Hide();
            mainForm.Show();
        }
    }
}
